﻿using System.Data;
using System.Data.Common;

namespace Company.BLL.DuLieuChuan
{
    public class PhuongThucVanTai : BaseClass
    {
        public static DataTable SelectAll()
        {
            string query = "SELECT * FROM t_HaiQuan_PhuongThucVanTai ORDER BY Ten";
            DbCommand dbCommand = db.GetSqlStringCommand(query);
            return db.ExecuteDataSet(dbCommand).Tables[0];
        }

        public static string getName(string id)
        {
            string query = "SELECT Ten FROM t_HaiQuan_PhuongThucVanTai where id='"+id+"'";
            DbCommand dbCommand = db.GetSqlStringCommand(query);
            return db.ExecuteScalar(dbCommand).ToString();
        }
    }
}